package com.yyge.controller.admin.mapstruct;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yyge.common.vo.resp.PageResp;
import com.yyge.controller.admin.orders.req.OrdersReq;
import com.yyge.controller.admin.orders.resp.OrdersResp;
import com.yyge.entity.Orders;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface OrdersConverter {
    OrdersConverter MAPPER = Mappers.getMapper(OrdersConverter.class);

     @Mapping(source="records",target="rows")
     PageResp page2vo(Page list);

     Orders orders2req(OrdersReq req);
     List<OrdersResp> orders2resp(List<Orders> list);
}
